package com.tsxy.mall.mapper;

import com.tsxy.mall.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserMapper {

    @Select({"select * from sys_user where username = #{username}"})
    User getByUserName(String username);

    @Insert({"insert into sys_user (username, password) values (#{username},#{password} )"})
    Integer reg(User user);
}
